<script id="postProcessVertexShader" type="text/something-not-javascript">
	attribute vec4 position;
	attribute vec2 texCoord;
	varying vec4 v_position;
	varying vec2 v_uv;
	void main() {
		v_position = position;
		v_uv = vec2(texCoord.x, texCoord.y);
		gl_Position = position;
	}
</script>
<script id="hdrFragmentShader" type="text/something-not-javascript">
	#ifdef GL_ES
	precision highp float;
	#endif

	uniform sampler2D   RTScene;
	uniform float       exposure;
	varying vec2        v_uv;

	vec3 decode_pnghdr(const in vec4 color){
		// remove gamma correction
		vec4 res = color * color;
		// decoded RI
		float ri = pow(2.0, res.w * 32.0 - 16.0);
		// decoded HDR pixel
		res.xyz = res.xyz * ri;
		return res.xyz;
	}

	void main(void)
	{
		vec4 color = texture2D(RTScene, v_uv).xyzw;
		color.xyz  = decode_pnghdr(color);
		// apply gamma correction and exposure
		gl_FragColor = vec4(pow(exposure * color.xyz, vec3(0.474)), 1.0);
	}
</script>